<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>v-for_key</title>
	<style>

	</style>
</head>
<body>

<div id="app">

	<button @click="arr.shift()">删除第一个元素</button>
	
	
	<div v-for="i in arr" :key="i.id">
		<input type="checkbox">
		{{ i.name }}
	</div>

</div>


<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.js"></script>
<script>
  let app = new Vue({
    el: '#app',
    data: {
      arr: [
        {id: 1, name: 'A'},
        {id: 2, name: 'B'},
        {id: 3, name: 'C'},
        {id: 4, name: 'D'},
      ]
    }
  })
</script>
</body>
</html>